<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo ''?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="Comsenz Inc." name="Copyright" />
<link rel="stylesheet" href="<?php echo $this->set_css('managecp.css', 'admin');?>" type="text/css" media="all" />
<script language="javascript" type="text/javascript" src="<?php echo $this->set_js('jquery.js');?>"></script>

<script language="javascript">
function checknote(obj)
{
	//向下找
	checknote_down(obj);
	//向下找
	checknote_up(obj);
}
function checknote_down(obj)
{
	var chk = $("input[type='checkbox']");
	var chk_len = chk.length;
	var cur_id = obj.id;
	var cur_check = obj.checked;
	for(var i=0; i<chk_len; i++)
	{
		chkid = chk[i].id;
		if (0 == chkid.indexOf(cur_id))
		{
			chk[i].checked = cur_check;
		}
	}

}
function checknote_up(obj)
{
	var chk = $("input[type='checkbox']");
	var chk_len = chk.length;
	var cur_id = obj.id;
	var cur_check = obj.checked;
	var cur_ids = cur_id.split('_');
	var id_count = cur_ids.length;
	//alert(id_count);
	if (id_count > 2 && cur_check == true)
	{
		var check_id = 'menu';
		for (var i=1; i<id_count-1 ;i++)
		{
			check_id += '_' + cur_ids[i];
			//alert($("#"+check_id).attr('id'));
			$("#"+check_id).attr('checked', true);
		}
	}
}
</script>
</head>
<body scroll="no">
<div class="container">
    <h3><a href="?c=group">用户组列表</a> 添加用户组</h3>
 		<form action="<?php echo $this->set_url('admin', 'group', 'insert');?>" method="post">
			<table id="menu_list" class="datalist fixwidth" style="width:100%;">
				<tr>
					<td style="width:5px;">组名：</td>
					<td align="left"><input type="text" id="groupname" name="groupname" value="<?php echo isset($group_list['name'])?$group_list['name']:''?>"></td>
				</tr>
				<?php foreach ($sysmenu_list as $key=>$val):?>
				<tr>
					<th width="5%"></th>
					<th style="float:left" id=""><?php echo isset($val['cname'])?$val['cname']:'';?></th>
				</tr>
				<?php endforeach;?>

				<tr class="nobg">
					<td><input type="submit" value="提 交" class="btn" /></td>
					<td><input type="hidden" name="gid" value="<?php echo $gid?>"></td>
				</tr>
				
			</table>
		</form>
    </div>
    
</div>
</body>
</html>
